package com.modern.js.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.modern.js.entity.Customer;
import com.modern.js.mapper.CustomerMapper;
import com.modern.js.service.ICustomerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author PIGS
 * @since 2020-03-28
 */
@Service
@Transactional
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService {
    @Autowired
    private CustomerMapper customerMapper;

    @Override
    public IPage<Customer> selectById(Page<Customer> page, Integer empId,String telphone,String customerName) {
        return customerMapper.selectById(page,empId,telphone,customerName);
    }

    @Override
    public IPage<Customer> selectList(Page<Customer> page,String empName,String createTime) {
        return customerMapper.selectList(page,empName,createTime);
    }

    @Override
    public List<Customer> selectCustomer(Integer empId) {
        return customerMapper.selectCustomer(empId);
    }

    @Override
    public IPage<Customer> selectCustomerIsOrders(Page<Customer> page,Integer empId) {
        return customerMapper.selectCustomerIsOrders(page,empId);
    }
}
